<?php
declare(strict_types=1);

namespace App\Job;

use App\Service\Web\ArticleService;
use Hyperf\AsyncQueue\Job;

class PublishArticleJob extends Job
{
    public function __construct(
        public readonly int $articleId,
        public readonly ArticleService $articleService,
    )
    {
    }

    public function handle()
    {
        $this->articleService->setStatus($this->articleId, 'published');
    }
}